package com.orange.core.pojo.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.io.Serializable;

/**
 * 错误码，A：客户端错误，B：服务端错误
 */
@AllArgsConstructor
@Getter
public enum EErrorCode implements Serializable {

    SUCCESS("00000", "OK"),
    REGISTER_ERROR("A0100", "用户注册错误"),
    USER_NOT_EXIST("A0110", "用户不存在"),
    USERNAME_PASSWORD_ERROR("A0200", "登录失败，用户名或密码错误"),
    ACCOUNT_DISABLED("A0201", "登录失败，帐号已被禁用"),
    LOGIN_EXPIRED("A0202", "登录超时，请重新登录"),
    ACCOUNT_PASSWORD_ERROR("A0203", "登录失败，账号或密码错误"),
    ACCOUNT_AUDIT_ERROR("A0204", "登录失败，账号尚未审核或审核失败"),
    NOT_BIND_WX("A0205", "尚未绑定微信"),
    CONCURRENT_SESSION_EXCEEDED("A0253", "登录失败，当前帐号已在其他位置登录"),
    ACCESS_FORBIDDEN("A0301", "权限不足，请联系管理员"),
    ACCESS_DENIED("A0302", "登录超时，请重新登录"),
    PARAM_ERROR("A0400", "请求参数错误"),
    REQUEST_ERROR("A0401", "请求错误"),
    NOT_FOUND("A0404", "请求资源不存在"),
    METHOD_NOT_ALLOWED("A0405", "Request method not supported"),
    PAYMENT_REQUIRED("A0501", "超过使用次数限制"),
    TOO_MANY_REQUESTS("A0502", "超过使用次数限制"),
    DUPLICATE_EXCHANGE_CAR_COUPON("A0503", "您已兑换过优惠券，请勿重复兑换"),
    SYSTEM_ERROR("B0001", "出错了，请稍后重试"),
    ;

    private final String code;
    private final String message;
}
